package com.yang.Thread;

/**
 * @Description: TODO
 * @Author: YangTing
 * @Date: 2024-05-14 07:26
 */

public class Test2 {
    public static void main(String[] args) {
//        A a = new A();
//        Thread thread = new Thread(a);
//        thread.start();
//        B b = new B();
//        new Thread(b).start();
        new Thread(){
            @Override
            public void run() {
                System.out.println("new Style");
            }
        }.start();
    }
}

class A extends Thread{
    @Override
    public void run() {
        System.out.println("A");
    }
}

class B implements Runnable{
    public void run() {
        System.out.println("B");
    }
}